package com.wf.course.service.impl;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.utils.page.PageBean;
import com.wf.course.dao.IImgInfoMapper;
import com.wf.course.model.comm.ImgInfo;
import com.wf.course.service.IImgInfoService;

@Service
@Transactional
public class IImgInfoServiceImpl implements IImgInfoService {
	
	@Autowired
	private IImgInfoMapper mapper;

	@Override
	public void getImgsList(PageBean<ImgInfo> pageBean) {
		// TODO Auto-generated method stub
		
		pageBean.setResults(mapper.getImgInfoList(pageBean));
		pageBean.setTotalCount(mapper.getImgInfoCount(pageBean));
		
	}

	@Override
	public void saveImg(ImgInfo img) {
		// TODO Auto-generated method stub
		mapper.saveImg(img);
		
	}

	@Override
	public void deleteImg(Integer id) {
		// TODO Auto-generated method stub
		mapper.deleteImg(id);
		
	}

	@Override
	public ImgInfo downLoadImg(Integer id) {
		// TODO Auto-generated method stub
		return mapper.downLoadImg(id);
	}

	@Override
	public Integer updateImg(ImgInfo img) {
		// TODO Auto-generated method stub
		return mapper.updateImg(img);
		
	}

	 

}
